// 合并配置，比较专业的模块：webpack-merge
// 合并配置，最好不要用Object.assign，它在复制对象时后面的配置会完全覆盖掉前面的配置
const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = merge(common, {
    mode: 'development',
    cache: true,
    plugins: [
        new CleanWebpackPlugin(),
        new CopyWebpackPlugin({
            patterns: [
                { from: "./public/*.ico", to: "./"},
            ],
        })
    ]
})
  